<div class="content articles">
  <h1>Articles</h1>
  
  <form method="post" action="" id="filters_form" class="filters_form">
    <div class="paging_table_container paging_table_order_view_settings admin_articles">
      <span class="angle left_top"></span>
      <span class="angle right_top"></span>

      <label><strong>Type:</strong></label>
      <select name="filter[type]" id="filter_type" class="filter type">
        {$type_options}
      </select>
      <label><strong>Category:</strong></label>
      <select name="filter[category]" id="filter_category" class="filter">
        {$category_options}
      </select>
      <label><strong>Applied to:</strong></label>
      <select name="filter[product]" id="filter_product" class="filter">
        {$product_options}
      </select>
      <label><strong>Language:</strong></label>
      <select name="filter[language]" id="filter_language" class="filter language">
        {$language_options}
      </select>

      <span class="angle right_bottom"></span>
      <span class="angle left_bottom"></span>
    </div>
  </form>
    
  {$pager}

  <div class="paging_table_order">
    <table class="table_info table_gray_header paging_table_price_list">
      <thead>
        <tr class="thead">
          <th class="left_column">Title</th>
          <th>Category</th>
          <th>Application</th>
          <th>Is&nbsp;Published</th>
          <th>Language</th>
          <th>Creation Date</th>
        </tr>
      </thead>
      <tbody>
      {foreach from=$articles item=item name=articles}
        <tr>
          <td class="left_column{if $smarty.foreach.articles.last} bottom_row{/if}"><a href="article.html?id={$item.id}">{$item.title}</a></td>
          <td {if $smarty.foreach.articles.last}class="bottom_row"{/if}>{$item.category}</td>
          <td {if $smarty.foreach.articles.last}class="bottom_row"{/if}>{if isset($item.products) &&  not empty($item.products)}{$item.products}{else}None{/if}</td>
          <td {if $smarty.foreach.articles.last}class="bottom_row"{/if}>{if $item.is_published}Yes{else}No{/if}</td>
          <td {if $smarty.foreach.articles.last}class="bottom_row"{/if}>{$item.language}</td>
          <td {if $smarty.foreach.articles.last}class="bottom_row"{/if}>{$item.date}</td>
        </tr>
      {foreachelse}
        <tr>
          <td class="left_column bottom_row" colspan="6">There are no articles with selected parameters</td>
        </tr>
      {/foreach}
      </tbody>
    </table>
  </div>

  {$pager}
  <div class="form_buttons_container">
    <div class="form_buttons">
       {include file="include/common_blocks/form_button.tpl" title="Create articte" href="/admin/article.html" class="button form_button" id="create_article"}
    </div>
  </div>
</div>